NAME=paper
SRCS=*.tex $(NAME).bib
OBJS=*.pdf *.dvi *.aux *.log *.blg *.bbl *.toc *~
FLAGS=-file-line-error -halt-on-error

$(NAME).pdf: $(SRCS)
	latex $(FLAGS) $(NAME)
	bibtex $(NAME)
	latex $(FLAGS) $(NAME)
	latex $(FLAGS) $(NAME)
	dvipdfm -p letter $(NAME)

clean:
	rm -f $(OBJS)
